@import org.scalaexercises.types.exercises.Section

@(section: Section)(implicit request: RequestHeader)
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
        </button>
        <h3 class="modal-title" id="myModalLabel">Users who have contributed to this file</h3>
      </div>
      <div class="modal-body">
        <ul>

          @for(contrib <- section.contributions) {
            <li>
              <div class="row">
                <div class="col-xs-9 col-md-9">
                  <a href="@contrib.authorUrl"><img class="avatar" src="@contrib.avatarUrl" alt=""></a>
                  <p>@contrib.message</p>
                  <span>
                    <a href="@contrib.authorUrl">@contrib.author</a>
                    contributed @contrib.timestamp</span>
                </div>
                <div class="col-xs-3 col-md-3">
                  <a href="@contrib.url" target="_blank" type="button" class="btn btn-default btn-sm">View on GitHub </a>
                </div>
              </div>
            </li>
          }

        </ul>

      </div>
    </div>
  </div>
</div>
